package com.hopu.mapper;

import com.hopu.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

    @Insert("insert into video.user (username, password, create_time)" +
            " VALUES (#{username},#{password},#{createTime})")
    void insert(User user);

    @Select("select * from video.user where username=#{username} and password=#{password}")
    User getByUsernameAndPassword(User user);
    //更新用户资料
    void updateUserInfo(User user);
    User getById(String userId);
}
